<template>
  <div>
    <p>你死亡的次数:{{count}} </p>
    <button @click="addFn">加1</button>
    <button @click="addFns(5)">加5</button>
    <button @click="addFnj">减1</button>


  </div>
</template>

<script>
export default {
  name: 'Vue2App',

  data() {
    return {
      count:0
      
    };
  },

   methods: {
    addFn(){
      this.count++
    },
    addFns(num){
         this.count+=num
    },
    addFnj(){
        this.count--
    }
  },
};
</script>

<style lang="scss" scoped>

</style>